package com.li.proxy.client;

import com.li.proxy.service.OrderService;
import com.li.proxy.service.OrderServiceImpl;
import com.li.proxy.service.OrderServiceImplSub;
import com.li.proxy.service.OrderServiceProxy;

public class Test {
    public static void main(String[] args) {
//        OrderService orderService = new OrderServiceImpl();
//        orderService.generate();
//        orderService.modify();
//        orderService.detail();
        //继承
//        OrderService orderService = new OrderServiceImplSub();
//        orderService.generate();
//        orderService.modify();
//        orderService.detail();
        //代理
        OrderService target = new OrderServiceImpl();
        OrderServiceProxy orderServiceProxy = new OrderServiceProxy(target);
        orderServiceProxy.generate();
        orderServiceProxy.modify();
        orderServiceProxy.detail();

    }
}
